<?php
// *** Tangra (Application Framework and Tools for PHP)
// $Id$
//

require_once(TANGRA_MAIN_DIR.'web_site/web_site_config.class.php');

class Web_Site_Vanilla_Config extends Web_Site_Config {
	private $log_exceptions;
	private $exceptions_log_file;
	private $save_context_on_exception;

	private $default_language;
	private $available_languages;
	private $available_languages_arr;
	private $current_language = false;


	public function set_log_exceptions($log_exceptions) {
		$this->log_exceptions = $log_exceptions ?
									true :
									false;
	}


	public function get_log_exceptions() {
		return $this->log_exceptions;
	}


	public function set_exceptions_log_file($exceptions_log_file) {
		$this->exceptions_log_file = $exceptions_log_file;
	}


	public function get_exceptions_log_file() {
		return $this->exceptions_log_file;
	}


	public function set_save_context_on_exception($save_context_on_exception) {
		$this->save_context_on_exception = $save_context_on_exception ?
									true :
									false;
	}


	public function get_save_context_on_exception() {
		return $this->save_context_on_exception;
	}


	public function set_default_language($default_language) {
		$this->default_language = $default_language;
	}


	public function get_default_language() {
		return $this->default_language;
	}


	public function set_available_languages($available_langs) {
		$this->available_languages = $available_langs;

		$arr = explode(',', $available_langs);
		foreach($arr as &$lang) {
			$lang = trim($lang);
		}

		$this->available_languages_arr = $arr;
	}


	public function get_available_languages() {
		return $this->available_languages;
	}


	public function get_available_languages_arr() {
		return $this->available_languages_arr;
	}


	public function set_current_language($lang) {
		$this->current_language = $lang;
	}


	public function get_current_language() {
		return $this->current_language;
	}
}

